<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>随便打TCS系统</title>
<!-- Bootstrap -->
<link href="<%=basePath%>vendors/bootstrap/dist/css/bootstrap.min.css"
	rel="stylesheet">
<!-- Font Awesome -->
<link
	href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
	rel="stylesheet">
<!-- NProgress -->
<link href="<%=basePath%>vendors/nprogress/nprogress.css"
	rel="stylesheet">
<!-- iCheck -->
<link href="<%=basePath%>vendors/iCheck/skins/flat/green.css"
	rel="stylesheet">

<!-- bootstrap-progressbar -->
<link
	href="<%=basePath%>vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css"
	rel="stylesheet">
<!-- JQVMap -->
<link href="<%=basePath%>vendors/jqvmap/dist/jqvmap.min.css"
	rel="stylesheet" />
<!-- bootstrap-daterangepicker -->
<link
	href="<%=basePath%>vendors/bootstrap-daterangepicker/daterangepicker.css"
	rel="stylesheet">

<!-- Custom Theme Style -->
<link href="<%=basePath%>build/css/custom.min.css" rel="stylesheet">

</head>
<body class="nav-md">
	<%@ include file="loginCheck.jsp"%>
	<div class="container body">
		<div class="main_container">
			<div class="col-md-3 left_col">
				<div class="left_col scroll-view">
					<div class="clearfix"></div>
					<br />
				</div>
			</div>
			<!-- page content -->
			<div class="right_col" role="main">
				<div class="">
					<div class="page-title">
						<div class="title_left">
							<h3>配置管理</h3>
						</div>
					</div>
					<div class="clearfix"></div>
					<div class="row">
						<div class="col-md-12 col-sm-12 col-xs-12">
							<div class="x_panel">
								<div class="x_title">
									<h2>修改账户信息以及相关配置</h2>
									<div class="clearfix"></div>
								</div>
								<div class="x_content">
									<span class="section" style="border-bottom: 0">回调配置</span>
									<div class="item form-group">
										<label class="control-label col-md-3 col-sm-3 col-xs-12"
											   for="callbackurl" style="text-align: right;padding-top: 8px;">回调地址 </label>
										<div class="col-md-6 col-sm-6 col-xs-12">
											<input id="callbackurl" class="form-control col-md-7 col-xs-12"
												   data-validate-length-range="6" data-validate-words="2"
												   name="prefix" placeholder="" required="required"
												   type="text" value="${callbackurl}">
										</div>
									</div>
									<form name="myForm" class="form-horizontal form-label-left"
										novalidate method="post" enctype="multipart/form-data"
										id="myForm">
										<p>
											请谨慎修改相关信息，如有修改错误请及时
											<code>联系客服</code>
											以帮助您完成相关配置
										</p>
										<span class="section">基本信息</span>
										<div class="item form-group" style="display: none">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name">id<span class="required"></span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="id" name="id"
													class="form-control col-md-7 col-xs-12" type="text"
													value="${users.id}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name">通讯录名称 </label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="prefix" class="form-control col-md-7 col-xs-12"
													data-validate-length-range="6" data-validate-words="2"
													name="prefix" placeholder="" required="required"
													   type="text" value="${users.prefix}" <c:if test="${users.role == 2}"> disabled </c:if> >
											</div>
										</div>


										<span class="section">淘客配置</span>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">阿里妈妈会员名称 <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="tbname" class="form-control col-md-7 col-xs-12"
													   data-validate-length-range="6" data-validate-words="2"
													   name="tbname" placeholder="例如：sbd,当前名称：${users.tbname}" required="required"
													   type="text" value="">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name">阿里妈妈AppKey <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="appkey" class="form-control col-md-7 col-xs-12"
													data-validate-length-range="6" data-validate-words="2"
													name="appkey" placeholder="例如：25617525" required="required"
													type="text" value="${users.appkey}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name">阿里妈妈AppSecert <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="appsecret"
													class="form-control col-md-7 col-xs-12"
													data-validate-length-range="6" data-validate-words="2"
													name="appsecret"
													placeholder="例如：a567a235154ecs0cd1324d43469a5626"
													required="required" type="text" value="${users.appsecret}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">阿里妈妈广告位第一段PID <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="tbonepid" class="form-control col-md-7 col-xs-12"
													   data-validate-length-range="6" data-validate-words="2"
													   name="tbonepid" placeholder="例如：355932010" required="required"
													   type="text" value="${users.tbonepid}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name">阿里妈妈广告位第三段PID <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="adid" class="form-control col-md-7 col-xs-12"
													data-validate-length-range="6" data-validate-words="2"
													name="adid" placeholder="例如：145912000" required="required"
													type="text" value="${users.adid}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name">阿里妈妈推广位PID <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="pid" class="form-control col-md-7 col-xs-12"
													data-validate-length-range="6" data-validate-words="2"
													name="pid" placeholder="例如：mm_101082177_39184040_145910000"
													required="required" type="text" value="${users.pid}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">为你推荐物料ID <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="materialid" class="form-control col-md-7 col-xs-12"
													   data-validate-length-range="6" data-validate-words="2"
													   name="materialid" placeholder="例如：9660"
													   required="required" type="text" value="${users.materialid}">
												<br/>
												<a href="https://tbk.bbs.taobao.com/detail.html?appId=45301&postId=8576096">
													详细物料id见：https://tbk.bbs.taobao.com/detail.html?appId=45301&postId=8576096</a>
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">喵有券appKey <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="myqappkey" class="form-control col-md-7 col-xs-12"
													   data-validate-length-range="6" data-validate-words="2"
													   name="myqappkey" placeholder="例如：435f526e-4a52-e9b3-86s0-43b1b543f572"
													   required="required" type="text" value="${users.myqappkey}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name">大淘客Appkey <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="dappkey" class="form-control col-md-7 col-xs-12"
													data-validate-length-range="6" data-validate-words="2"
													name="dappkey" placeholder="例如：5a1e6296d6"
													required="required" type="text" value="${users.dappkey}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name">授权Appkey <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="sqappkey" class="form-control col-md-7 col-xs-12"
													data-validate-length-range="6" data-validate-words="2"
													name="sqappkey" placeholder="例如：f75po555"
													required="required" type="text" value="${users.sqappkey}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">街兔Appkey <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="reactxappkey" class="form-control col-md-7 col-xs-12"
													   data-validate-length-range="6" data-validate-words="2"
													   name="reactxappkey" placeholder="例如：sbd"
													   required="required" type="text" value="${users.reactxappkey}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">拼多多ClientId <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="clientid" class="form-control col-md-7 col-xs-12"
													   data-validate-length-range="6" data-validate-words="2"
													   name="clientid" placeholder="例如：25617525" required="required"
													   type="text" value="${users.clientid}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">拼多多ClientSecret <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="clientsecret"
													   class="form-control col-md-7 col-xs-12"
													   data-validate-length-range="6" data-validate-words="2"
													   name="clientsecret"
													   placeholder="例如：a567a235154ecs0cd1324d43469a5626"
													   required="required" type="text" value="${users.clientsecret}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">拼多多PID <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="clientpid"
													   class="form-control col-md-7 col-xs-12"
													   data-validate-length-range="6" data-validate-words="2"
													   name="clientpid"
													   placeholder="例如：a567a235154ecs0cd1324d43469a5626"
													   required="required" type="text" value="${users.clientpid}">
											</div>
											<div><input id="tkother" type="button" class="btn btn-default" value="淘客其他"></div>
										</div>
										<span class="section">软件配置</span>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">主题色调1 <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="colour1" class="form-control col-md-7 col-xs-12"
													   data-validate-length-range="6" data-validate-words="2"
													   name="colour1" placeholder="例如：#8314F2"
													   required="required" type="text" value="${users.colour1}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">主题色调2 <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="colour2" class="form-control col-md-7 col-xs-12"
													   data-validate-length-range="6" data-validate-words="2"
													   name="colour2" placeholder="例如：#E92E90"
													   required="required" type="text" value="${users.colour2}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name" id="android" style="cursor: pointer;">安卓版本号
												<span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="androidversion"
													class="form-control col-md-7 col-xs-12"
													data-validate-length-range="6" data-validate-words="2"
													name="androidversion" placeholder="例如：3.3"
													required="required" type="text"
													value="${users.androidversion}">
											</div>
											<span id="updateandroid"
												style="font-size: 14px; color: #ff0033; display: none">
												如要更新版本内容，请点击"安卓版本号"进行更新发布</span>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name">Android安装包 <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input class="form-control col-md-7 col-xs-12"
													id="androidFile" name="androidFile" required="required"
													type="file" placeholder="选择上传文件" form="formUpload">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="website">Android下载地址 <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input type="url" id="androidpath" name="androidpath"
													required="required"
													placeholder="例如：http://admin.xsroem.com/download/suibianda.apk"
													class="form-control col-md-7 col-xs-12"
													value="${users.androidpath}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name" id="ios" style="cursor: pointer;">IOS版本号
												<span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="iosversion"
													class="form-control col-md-7 col-xs-12"
													data-validate-length-range="6" data-validate-words="2"
													name="iosversion" placeholder="例如：1.0.7"
													required="required" type="text" value="${users.iosversion}">
											</div>
											<span id="updateios"
												style="font-size: 14px; color: #ff0033; display: none">
												如要更新版本内容，请点击"IOS版本号"进行更新发布</span>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name">IOS安装包 <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input class="form-control col-md-7 col-xs-12" id="iosFile"
													name="iosFile" required="required" type="file"
													placeholder="选择上传文件" form="formUpload">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="website">IOS下载地址 <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input type="url" id="iospath" name="iospath"
													required="required"
													placeholder="例如：itms-services://?action=download-manifest&url=https://admin.xsroem.com/download/mainfest.plist"
													class="form-control col-md-7 col-xs-12"
													value="${users.iospath}">
											</div>
										</div>
										<span class="section">支付配置</span>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name">支付宝AppId <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="appid" class="form-control col-md-7 col-xs-12"
													data-validate-length-range="6" data-validate-words="2"
													name="appid" placeholder="例如：2017120800458268"
													required="required" type="text" value="${users.appid}">
											</div>
										</div>
										<div class="form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12">支付宝商户私钥
												<span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<textarea name="keypath" id="keypath" class="form-control">${users.keypath}</textarea>
											</div>
										</div>
										<div class="form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12">支付宝公钥
												<span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<textarea name="alipubkey" id="alipubkey"
													class="form-control">${users.alipubkey}</textarea>
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name">微信AppId <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="wxappid" class="form-control col-md-7 col-xs-12"
													data-validate-length-range="6" data-validate-words="2"
													name="wxappid" placeholder="例如：wxaq3bcca31dfc72a4"
													required="required" type="text" value="${users.wxappid}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name">微信商户Id <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="wxmchid" class="form-control col-md-7 col-xs-12"
													data-validate-length-range="6" data-validate-words="2"
													name="wxmchid" placeholder="例如：1316372165"
													required="required" type="text" value="${users.wxmchid}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name">微信Key <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="wxapikey" class="form-control col-md-7 col-xs-12"
													data-validate-length-range="6" data-validate-words="2"
													name="wxapikey" placeholder="例如：Q73A7672023W8AA62484456KF3AA826C"
													required="required" type="text" value="${users.wxapikey}">
											</div>
											<div><input id="wxother" type="button" class="btn btn-default" value="微信其他"></div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">银联商户ID <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="unionmchid" class="form-control col-md-7 col-xs-12"
													   data-validate-length-range="6" data-validate-words="2"
													   name="unionmchid" placeholder="例如：777290058110048"
													   required="required" type="text" value="${users.unionmchid}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">银联商户私钥证书 <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input class="form-control col-md-7 col-xs-12"
													   id="acpSignFile" name="acpSignFile" required="required"
													   type="file" placeholder="选择上传文件" form="formUpload">
												<input id="acpsign" name="acpsign" class="form-control col-md-7 col-xs-12"
														style="display: none" type="text" value="${users.acpsign}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">银联密码加密证书 <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input class="form-control col-md-7 col-xs-12"
													   id="acpEncFile" name="acpEncFile" required="required"
													   type="file" placeholder="选择上传文件" form="formUpload">
												<input id="acpenc" name="acpenc" class="form-control col-md-7 col-xs-12"
													   style="display: none" type="text" value="${users.acpenc}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">银联中级证书 <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input class="form-control col-md-7 col-xs-12"
													   id="acpMiddleFile" name="acpMiddleFile" required="required"
													   type="file" placeholder="选择上传文件" form="formUpload">
												<input id="acpmiddle" name="acpmiddle" class="form-control col-md-7 col-xs-12"
													   style="display: none" type="text" value="${users.acpmiddle}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">银联根证书 <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input class="form-control col-md-7 col-xs-12"
													   id="acpRootFile" name="acpRootFile" required="required"
													   type="file" placeholder="选择上传文件" form="formUpload">
												<input id="acproot" name="acproot" class="form-control col-md-7 col-xs-12"
													   style="display: none" type="text" value="${users.acproot}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">连连商户ID <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="lianlianmchid" class="form-control col-md-7 col-xs-12"
													   data-validate-length-range="6" data-validate-words="2"
													   name="lianlianmchid" placeholder="例如：777290058110048"
													   required="required" type="text" value="${users.lianlianmchid}">
											</div>
										</div>
										<div class="form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12">连连商户私钥
												<span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<textarea name="linaliankey" id="linaliankey"
														  class="form-control">${users.linaliankey}</textarea>
											</div>
										</div>
										<span class="section">其他配置</span>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name">极光推送AppKey <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="jpushappkey"
													class="form-control col-md-7 col-xs-12"
													data-validate-length-range="6" data-validate-words="2"
													name="jpushappkey"
													placeholder="例如：bcd79157c12e87203284087f"
													required="required" type="text"
													value="${users.jpushappkey}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name">极光推送MasterSecret <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input id="mastersecret"
													class="form-control col-md-7 col-xs-12"
													data-validate-length-range="6" data-validate-words="2"
													name="mastersecret"
													placeholder="例如：ag331d2042728a32c5d1615d"
													required="required" type="text"
													value="${users.mastersecret}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												for="name">LOGO <span class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<input class="form-control col-md-7 col-xs-12" id="picFile"
													name="picFile" required="required" type="file"
													placeholder="选择上传图片" form="formUpload"> <input
													id="pic" name="pic" class="form-control col-md-7 col-xs-12"
													style="display: none" type="text" value="${users.pic}">
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">充值更改商家<span
													class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<select class="form-control" id="isupdateshop" name="isupdateshop">
													<c:if test="${users.isupdateshop == 1 }">
														<option value="1" selected="selected">开启</option>
														<option value="0">关闭</option>
													</c:if>
													<c:if test="${users.isupdateshop == 0 }">
														<option value="1">开启</option>
														<option value="0" selected="selected">关闭</option>
													</c:if>
												</select>
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">优惠推送<span
													class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<select class="form-control" id="ispush" name="ispush">
													<c:if test="${users.ispush == 1 }">
														<option value="1" selected="selected">开启</option>
														<option value="0">关闭</option>
													</c:if>
													<c:if test="${users.ispush == 0 }">
														<option value="1">开启</option>
														<option value="0" selected="selected">关闭</option>
													</c:if>
												</select>
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">佣金推送<span
													class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<select class="form-control" id="isrebatepush" name="isrebatepush">
													<c:if test="${users.isrebatepush == 1 }">
														<option value="1" selected="selected">开启</option>
														<option value="0">关闭</option>
													</c:if>
													<c:if test="${users.isrebatepush == 0 }">
														<option value="1">开启</option>
														<option value="0" selected="selected">关闭</option>
													</c:if>
												</select>
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">注册推送<span
													class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<select class="form-control" id="isregisterpush" name="isregisterpush">
													<c:if test="${users.isregisterpush == 1 }">
														<option value="1" selected="selected">开启</option>
														<option value="0">关闭</option>
													</c:if>
													<c:if test="${users.isregisterpush == 0 }">
														<option value="1">开启</option>
														<option value="0" selected="selected">关闭</option>
													</c:if>
												</select>
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">充值推送<span
													class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<select class="form-control" id="isrechargepush" name="isrechargepush">
													<c:if test="${users.isrechargepush == 1 }">
														<option value="1" selected="selected">开启</option>
														<option value="0">关闭</option>
													</c:if>
													<c:if test="${users.isrechargepush == 0 }">
														<option value="1">开启</option>
														<option value="0" selected="selected">关闭</option>
													</c:if>
												</select>
											</div>
											<div><input id="memberother" type="button" class="btn btn-default" value="会员配置"></div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">抵扣类型(自建商城)<span
													class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<select class="form-control" id="deducttype" name="deducttype">
													<c:if test="${users.deducttype == 1 }">
														<option value="1" selected="selected">话费抵扣</option>
														<option value="2">购物金抵扣</option>
													</c:if>
													<c:if test="${users.deducttype == 2 }">
														<option value="1">话费抵扣</option>
														<option value="2" selected="selected">购物金抵扣</option>
													</c:if>
												</select>
											</div>
										</div>
										<div class="item form-group">
											<label class="control-label col-md-3 col-sm-3 col-xs-12"
												   for="name">淘宝数据来源<span
													class="required">*</span>
											</label>
											<div class="col-md-6 col-sm-6 col-xs-12">
												<select class="form-control" id="tbapitype" name="tbapitype">
													<option value="1" <c:if test="${users.tbapitype == 1 }">selected="selected"</c:if>>阿里妈妈</option>
													<option value="2" <c:if test="${users.tbapitype == 2 }">selected="selected"</c:if>>街兔</option>
												</select>
											</div>
										</div>
										<div class="ln_solid"></div>
										<div class="form-group">
											<div class="col-md-6 col-md-offset-3">
												<a type="submit" class="btn btn-primary"
													href="javascript:void(0)"
													onclick="history.back(-1);">取消</a> <input
													id="revise" type="button" class="btn btn-success"
													value="修改"> <input id="androidpublish"
													type="button" class="btn btn-success" value="发布安卓版本详情"
													style="display: none"
													onclick="content_fabugongnengjieshao(1)"> <input
													id="iospublish" type="button" class="btn btn-success"
													value="发布苹果版本详情" style="display: none"
													onclick="content_fabugongnengjieshao(2)">
											</div>
										</div>
									</form>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- /page content -->
	<!-- 上传图片并修改 -->
	<script src="<%=basePath%>vendors/jquery/dist/jquery.min.js"></script>
	<script>
		$(document).ready(function(e) {
			$("#android").click(function(e) 
				{$("#androidpublish").toggle();
			});
		});
		
		$(document).ready(function(e) {
			$("#ios").click(function(e) 
				{$("#iospublish").toggle();
			});
		});
		
		$("#androidversion").mouseover(function(){
		    $("#updateandroid").css("display","block");
		});
		$("#androidversion").mouseout(function(){
			$("#updateandroid").css("display","none");
		});
		
		$("#iosversion").mouseover(function(){
		    $("#updateios").css("display","block");
		});
		$("#iosversion").mouseout(function(){
			$("#updateios").css("display","none");
		});
		function content_fabugongnengjieshao(type) {
			location.href = "content_fabugongnengjieshao?type=" + type;
		}
    </script>
	<script type="text/javascript">
		$('#tkother').click(function () {
			location.href = "other_allocations_index";
		});
		$('#wxother').click(function () {
			location.href = "wx_allocations_index";
		});
		$('#memberother').click(function () {
			location.href = "member_allocations_index";
		});
		$('#revise').click(function () {
			// 上传文件
			var androidFile = $("#androidFile")[0].files[0];
		    var iosFile = $("#iosFile")[0].files[0];
		    var picFile = $("#picFile")[0].files[0];
			var acpSignFile = $("#acpSignFile")[0].files[0];
			var acpEncFile = $("#acpEncFile")[0].files[0];
			var acpMiddleFile = $("#acpMiddleFile")[0].files[0];
			var acpRootFile = $("#acpRootFile")[0].files[0];
			if(androidFile != null || androidFile != undefined){
		    	$("#androidpath").val(addfile(androidFile));
			}
		    if(iosFile != null || iosFile != undefined){
		    	$("#iospath").val(addfile(iosFile));
			}
			if(acpSignFile != null || acpSignFile != undefined){
				$("#acpsign").val(addunionfile(acpSignFile));
			}
			if(acpEncFile != null || acpEncFile != undefined){
				$("#acpenc").val(addunionfile(acpEncFile));
			}
			if(acpMiddleFile != null || acpMiddleFile != undefined){
				$("#acpmiddle").val(addunionfile(acpMiddleFile));
			}
			if(acpRootFile != null || acpRootFile != undefined){
				$("#acproot").val(addunionfile(acpRootFile));
			}
		    if(picFile != null || picFile != undefined){
		    	var fileName = picFile.name.substring(picFile.name.lastIndexOf(".")+1).toLowerCase();
				if(fileName !="jpg" && fileName !="jpeg" && fileName !="png"&& fileName !="gif" ){
					alert("只能上传 .jpg .png .jpeg .gif类型的文件");
		            return false;
				}
		    	$("#pic").val(addfile(picFile));
		 	}
		 	var callbackurl=$("#callbackurl").val();
            if(callbackurl!=null && callbackurl!=undefined && callbackurl!=""){
                $.ajax({
                    type: 'POST',
                    url : 'callbackurlupdate',
                    data : {
                        url:callbackurl
                    },
                    dataType: 'json',
                    success : function(date) {
                        console.log("回调修改成功");
                    },
                    error : function() {
                        console.log("回调修改成功");
                    }
                });


            }

		    $.ajax({
	            type: 'POST',
	            url : 'allocations_do_update',
	            data : $('#myForm').serialize(),
	            dataType: 'json',
	            success : function(date) {
	            	switch (date) {
					case -1:
						alert("登录超时，请重新登录");
						top.location.href = "login/${titleId}";
						break;
					case 1:
						alert("修改成功");
						location.href = "allocations_index";
						break;
					default:
						alert("修改失败，请重新操作");
						break;
					}
				},
				error : function() {
					alert("修改失败，请重新操作");
			    }
	        });
		});		

		function addfile(file) {
			var fm = new FormData();
			fm.append('file', file);
			$.ajax({
				url: '<%=basePath%>layfile/uploadFile1',
				type : 'POST',
				data : fm,
				async : false,
				contentType : false, //禁止设置请求类型
				processData : false, //禁止jquery对DAta数据的处理,默认会处理
				//禁止的原因是,FormData已经帮我们做了处理
				success : function(result) {
					file = result.json;
				}
			});
			return file;
		}

		function addunionfile(file) {
			var fm = new FormData();
			fm.append('file', file);
			$.ajax({
				url: '<%=basePath%>file/uploadUnionFile',
				type : 'POST',
				data : fm,
				async : false,
				contentType : false, //禁止设置请求类型
				processData : false, //禁止jquery对DAta数据的处理,默认会处理
				//禁止的原因是,FormData已经帮我们做了处理
				success : function(result) {
					file = result.json;
				}
			});
			return file;
		}
	</script>
	<!-- Bootstrap -->
	<script src="<%=basePath%>vendors/bootstrap/dist/js/bootstrap.min.js"></script>
	<!-- FastClick -->
	<script src="<%=basePath%>vendors/fastclick/lib/fastclick.js"></script>
	<!-- NProgress -->
	<script src="<%=basePath%>vendors/nprogress/nprogress.js"></script>
	<!-- bootstrap-daterangepicker -->
	<script src="<%=basePath%>vendors/moment/min/moment.min.js"></script>
	<script
		src="<%=basePath%>vendors/bootstrap-daterangepicker/daterangepicker.js"></script>
	<!-- Chart.js -->
	<script src="<%=basePath%>vendors/Chart.js/dist/Chart.min.js"></script>

	<!-- Custom Theme Scripts -->
	<script src="<%=basePath%>build/js/custom.min.js"></script>
</body>
</html>